﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Resources;
using System.Globalization;
using LPV_POS.Module;
using LPV_POS.mh_pos;

namespace LPV_POS.thuvien_cls
{
    public class thongbao_lang
    {
        CultureInfo culture;
        string title =""; 
        string info ="";
        Mod_messagebox mess;
        public void show_info(string language, string type )
        {
            mess = new Mod_messagebox();
            culture = CultureInfo.CurrentCulture;
            cpublic ocpublic = new cpublic();
            string str_lang = ocpublic.Registry_Get("mh_main_lang");
            if (str_lang == "")
                str_lang = "vi-VN";
            culture = CultureInfo.CreateSpecificCulture(str_lang);
            ResourceManager rm = new ResourceManager("LPV_POS.Muti_language.MyResource", typeof(mh_banhang6_PhuThu).Assembly);
            title = rm.GetString("thongbao_1", culture);
            switch ( type)
            {
                case "quyen":
                    info = rm.GetString("bankhongcoquyen", culture);
                    mess.messagebox_pos(title, info, loaithongbao.canhbao.GetHashCode());
                    break;
                case "thanhcong":
                    info = rm.GetString("thanhcong", culture);
                    mess.messagebox_pos(title, info, loaithongbao.canhbao.GetHashCode());
                    break;
                case "khongthanhcong":
                    info = rm.GetString("khongthanhcong", culture);
                    mess.messagebox_pos(title, info, loaithongbao.canhbao.GetHashCode());
                    break;
                case "chatchan":
                    info = rm.GetString("chatchan", culture);
                    mess.messagebox_pos(title, info, loaithongbao.yesno.GetHashCode());
                    break;
                case "chatchan_thoat":
                    info = rm.GetString("chatchan_thoat", culture);
                    mess.messagebox_pos(title, info, loaithongbao.yesno.GetHashCode());
                    break;
                case "dulieu":
                    info = rm.GetString("dulieu", culture);
                    mess.messagebox_pos(title, info, loaithongbao.canhbao.GetHashCode());
                    break;
                case "tungaynhohon":
                    info = rm.GetString("tungaynhohon", culture);
                    mess.messagebox_pos(title, info, loaithongbao.canhbao.GetHashCode());
                    break;
            }

            
           // mess.messagebox_pos(title, info, loaithongbao.canhbao.GetHashCode()); 
        }
        
         
               
    }
}
